<?  $maps = $this->maps;

?>
<? foreach ($maps as $one_map): ?>

<table>
    <tr>
        <td><img width="140px" src="<?= $one_map['url'] ?>" alt="<?= $one_map['title']?>"></td>
        <td>
            <form action="admin/updatename/id/<?=$one_map['id']?>" method="post">
                <label>
                    <input type="text" value="<?=$one_map['title']?>" name="name">
                </label>

                <input type="submit" value="Update name">
            </form>


            Current: <?=$one_map['title']?>
        </td>

        <?

        ?>
        <td>
            <form action="admin/time/id/<?=$one_map['id']?>" method="post">
                <label>
                    <input name="starttime" class="datepicker"
                           value="<?=date_format($one_map['datestart'], "m.d.y")?>">
                    Current: <?=date_format($one_map['datestart'], "m.d.y")?>
                </label>
                <label>
                    <input name="endtime" class="datepicker" value="<?= date_format($one_map['dateend'], "m.d.y")?>">
                    Current: <?= date_format($one_map['dateend'], "m.d.y")?>
                </label>
                <input type="submit" value="Update time">
            </form>
        </td>
<!--        <td>-->
<!--            <form action="admin/del/id/--><?//=$one_map['id']?><!--" method="post">-->
<!--                <input type="submit" value="Delete">-->
<!--            </form>-->
<!--        </td>-->

    </tr>

</table>
<? endforeach; ?>

<script type="text/javascript">
    $(function() {

        $(".datepicker").datepicker();
    });
</script>